﻿using BLL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Data;

namespace BarcodeServices
{
    /// <summary>
    /// BarcodeJudgeServices 的摘要说明
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务，请取消注释以下行。 
    // [System.Web.Script.Services.ScriptService]
    public class BarcodeJudgeServices : System.Web.Services.WebService
    {
        private UserBLL ubll = new UserBLL();
        private ICStockBLL Icbll = new ICStockBLL();//入库
        private ICEntrustBLL Iebll = new ICEntrustBLL();//委外
        private InventoryBLL Intbll = new InventoryBLL();//盘点       
        private SEOutStockBLL SEObll = new SEOutStockBLL();//销售出库
        private ICAllocationBLL Icabll = new ICAllocationBLL();//调拨
        private LockStoreBLL Lock = new LockStoreBLL();//拆包
        private JointBLL Joinbll = new JointBLL();//虚采
        private AbandonBLL ABbll = new AbandonBLL();//报废出库
        private DeliveryBLL debll = new DeliveryBLL();//总成出库
        private AbanINStockBLL aibll = new AbanINStockBLL();//报废入库
        private AuthorityBLL abll = new AuthorityBLL();//权限
        private AdjustPositionBLL aabll = new AdjustPositionBLL();//调整库位
        private FastOutStockBLL fosb = new FastOutStockBLL(); //快速出库  

        #region 登录
        /// 测试
        [WebMethod]
        public string ceshi(string name, string password)
        {
            return "hello";
        }
        /// 登录判断       
        [WebMethod]
        public string login(string name, string password, out string id)
        {
           // string id = "";
            return ubll.login(name, password, out  id );
        }
        /// 获取仓位名称
        [WebMethod]
        public bool GetPlaceName(string PlaceBarCode, out string PlaceName, out string FName)
        {
            return Icbll.GetPlaceName(PlaceBarCode, out PlaceName, out  FName);
        }

       
        #endregion

        #region 入库

        /// 获取入库单列表
        [WebMethod]
        public DataSet GetICStockBill()
        {
            DataSet ld_return = new DataSet();
            ld_return = Icbll.GetICStockBill();
            ld_return.Tables[0].TableName = "ICStock";
            return ld_return;
        }
        /// 获取入库单里的明细
        [WebMethod]
        public DataSet GetICStockBillEntry(string FBrNo)
        {
            DataSet ld_return = new DataSet();
            ld_return = Icbll.GetICStockBillEntry(FBrNo);
            ld_return.Tables[0].TableName = "ICStockEntry";
            return ld_return;
        }
        /// 更新入库单明细
        [WebMethod]
        public bool UpdateICStockEntry(string FEntryNo, string PkgsBarCode, string PlaceBarCode, string dc)
        {
            return Icbll.UpdateICStockEntry(FEntryNo, PkgsBarCode, PlaceBarCode, dc);
        }

        // 根据条码获取产成品入库的条码信息,
        [WebMethod]
        public bool GetICStockBillEntryCode(string PkgsBarCode, string FBrNo, out string FEntryNo, out string PlaceBarCode, out string PlaceName, out string dc)
        {
            //string FEntryNo = ""; string PlaceBarCode = ""; string PkgsIsRegular = ""; string PlaceName = "";
            //FEntryNo = ""; PlaceBarCode = ""; PkgsIsRegular = ""; PlaceName = "";
             return Icbll.GetICStockBillEntryCode(PkgsBarCode, FBrNo, out  FEntryNo, out PlaceBarCode, out PlaceName, out dc);
        }

        /// 完成入库单 out
        [WebMethod]
        public bool FinishICStock(string FBrNo, string ry, string id, out string txt)
        {
            //string txt = "";
            return Icbll.FinishICStock(FBrNo, ry, id, out  txt);
        }
        /// <summary>
        /// 查询已扫描
        /// </summary>
        /// <param name="FBrNo"></param>
        /// <returns></returns>
         [WebMethod]
        public DataSet GetICStockBillcount(string FBrNo)
        {
            return Icbll.GetICStockBillcount(FBrNo);
        }
         /// <summary>
        /// 同步金蝶入库单
        /// </summary>
        /// <param name="FBillNo"></param>
        /// <returns></returns>
        [WebMethod]
        public int INSERT_ICStockBill(string FBillNo)
        {
            return Icbll.INSERT_ICStockBill(FBillNo);
        }
        #endregion

        #region 委外

        /// 获取委外入库单列表
        [WebMethod]
        public DataSet GetICEntrust()
        {
            DataSet ld_return = new DataSet();
            ld_return = Iebll.GetICEntrust();
            ld_return.Tables[0].TableName = "ICEntrust";
            return ld_return;
        }
        /// 获取委外入库单里的明细
        [WebMethod]
        public DataSet GetICEntrustEntry(string FBrNo)
        {
            DataSet ld_return = new DataSet();
            ld_return = Iebll.GetICEntrustEntry(FBrNo);
            ld_return.Tables[0].TableName = "ICEntrustDetail";
            return ld_return;
        }
        /// 更新委外入库单明细
        [WebMethod]
        public bool UpdateICEntrustEntry(string FEntryNo, string PkgsBarCode, string PlaceBarCode)
        {
            return Iebll.UpdateICEntrustEntry(FEntryNo, PkgsBarCode, PlaceBarCode);
        }
        /// 完成委外入库单
        [WebMethod]
        public bool FinishICEntrust(string FBrNo, string InStkMan, out string txt)
        {
            return Iebll.FinishICEntrust(FBrNo, InStkMan, out  txt);
        }

        #endregion

        #region 盘点

        /// 获取盘点单列表
        [WebMethod]
        public DataSet GetInventory()
        {
            DataSet ld_return = new DataSet();
            ld_return = Intbll.GetInventory();
            ld_return.Tables[0].TableName = "Inventory";
            return ld_return;
        }

        /// 获取盘点单里的明细
        [WebMethod]
        public DataSet GetInventoryDetail(string FBrNo)
        {
            DataSet ld_return = new DataSet();
            ld_return = Intbll.GetInventoryDetail(FBrNo);
            ld_return.Tables[0].TableName = "InventoryDetail";
            return ld_return;
        }

        /// 更新盘点单明细
        [WebMethod]
        public bool UpdateInventoryDetail(string FItemID, string NowNum)
        {
            return Intbll.UpdateInventoryDetail(FItemID, NowNum);
        }

        /// 扫码获取明细信息
        [WebMethod]
        public bool GetDetailNum(string FBrNo, string PlaceBarCode, out string FItemID, out string NowNum)
        {
            return Intbll.GetDetailNum(FBrNo, PlaceBarCode, out FItemID, out NowNum);
        }

        //对盘盈的条码进行备注1121 ql
        [WebMethod]
        public bool NoteCode(string FBrNo, string PkgsBarCode)
        {
            return Intbll.NoteCode(FBrNo, PkgsBarCode);
        }



        /// 完成盘点单
        [WebMethod]
        public bool FinishInventory(string FBrNo, string useId,out string txt)
        {
            //string txt = "";
            return Intbll.FinishInventory(FBrNo, useId, out txt);
        }

        #endregion

        #region 销售
        ///获取出库列表
        [WebMethod]
        public DataSet GetSEOutStockList()
        {
            DataSet ld_return = new DataSet();
            ld_return = SEObll.GetSEOutStockList();
            ld_return.Tables[0].TableName = "SEOutStock";
            return ld_return;

        }
        //获取销售出库明细
        [WebMethod]
        public DataSet GetSEOutStockDetail(string FBillNo, string PosiID)
        {
            DataSet ld_return = new DataSet();
            ld_return = SEObll.GetSEOutStockDetail(FBillNo, PosiID);
            ld_return.Tables[0].TableName = "SEOutStockDetail";
            return ld_return;
        }

        //获取条码信息
        [WebMethod]
        public bool GetSEOutStockCode(string PkgsBarCode, out string HelperCode, out string PlaceBarCode, out string PlaceName, out string Floor, out string Fsku, out string StickLen, out string Stick, out string FQty, out string PkgsIsRegular)
        {
             //string HelperCode=""; string PlaceBarCode=""; 
             //string PlaceName=""; string  Floor="";
             //string Fsku=""; 
             //string StickLen="";  string Stick=""; 
             //string FQty="";  string PkgsIsRegular="";
            return SEObll.GetSEOutStockCode(PkgsBarCode, out  HelperCode, out  PlaceBarCode, out  PlaceName, out  Floor, out  Fsku, out  StickLen, out  Stick, out  FQty, out  PkgsIsRegular); //
        }
        

        //更新出库条码
        [WebMethod]
        public int UpdateSEOutStock(string PkgsBarCode, string FBillNO, string HelperCode, string FSku, string StickLen, string FQty, string PkgsIsRegular, string ID, string plname)
        {
            return SEObll.UpdateSEOutStock(PkgsBarCode, FBillNO, HelperCode, FSku, StickLen, FQty, PkgsIsRegular, ID, plname);
        }
        //排序
        [WebMethod]
        public int Updatepx(string PkgsBarCode, string FBillNO)
        {
            return SEObll.Updatepx(PkgsBarCode, FBillNO);
        }
        //插入出库条码
        [WebMethod]
        public int InsertSEOutStock(string PkgsBarCode, string oldPkgsBarCode, string DFInterID, string DFEntryID, string FDetailID, string FBillNo, string FEntryID, string FSourceBillNo, string Fry, string HelperCode, string t_PkgsIsRegular, string ID)
        {
            return SEObll.InsertSEOutStock( PkgsBarCode,  oldPkgsBarCode,  DFInterID,  DFEntryID,  FDetailID,  FBillNo,  FEntryID,  FSourceBillNo,  Fry,  HelperCode,  t_PkgsIsRegular, ID);
        }
        //查询出库扫码数量
        [WebMethod]
        public int GetScanQty(string FBillNo)
        {
            return SEObll.GetScanQty(FBillNo);
        }
        //查询未扫码的数量
        [WebMethod]
        public int SelScanQty(string FBillNo)
        {
            return SEObll.SelScanQty(FBillNo);
        }
        //将找不到的条码更新到t_SEOutStockDetail表中
        [WebMethod]
        public int UpdateNotFindCode(string oldPkgsBarCode, string FBillNo, string username)
        {
            return SEObll.UpdateNotFindCode(oldPkgsBarCode, FBillNo, username);
        }
        //将消件条码更新到t_SEOutStockDetail表中
        [WebMethod]
        public int UpdateTUIFindCode(string oldPkgsBarCode, string FBillNo, string username)
        {
            return SEObll.UpdateTUIFindCode(oldPkgsBarCode, FBillNo, username);
        }
        //判断替换的条码是否为同一销售出库单
        [WebMethod]
        public bool ISExist(string PkgsBarCode, string oldPkgsBarCode, string FBillNo)
        {
            return SEObll.ISExist(PkgsBarCode, oldPkgsBarCode, FBillNo);
        }
        [WebMethod]
        //往金蝶传输数据outout out 
        public bool jdSEOoutStock(string FBillNo, string userid, out string txt)
        {
            return SEObll.jdSEOoutStock(FBillNo, userid, out  txt);
        }
        //完成发货, out string txt
        [WebMethod]
        public bool FinishSEOoutStock(string FBillNo, string userid, out string txt)
        {
            //string txt = ""; out 
            return SEObll.FinishSEOoutStock(FBillNo, userid, out txt);
        }

        #endregion

        #region 权限
        [WebMethod]

        public string GetPDAAuthority(string id)
       {
           return abll.GetPDAAuthority(id);
       }
        #endregion

        #region 调拨

        /// 获取调拨单列表
        [WebMethod]
        public DataSet GetICAllocation(string states)
        {

            DataSet ld_return = new DataSet();
            ld_return = Icabll.GetICAllocation(states);
            ld_return.Tables[0].TableName = "ICAllocation";
            return ld_return;
        }
        /// 查询调拨单是否有没有扫描的
        [WebMethod]
        public DataSet Selissmwc(string FBrNo)
        {

            DataSet ld_return = new DataSet();
            ld_return = Icabll.Selissmwc(FBrNo);
            return ld_return;
        }
        /// 获取仓位名称
        [WebMethod]
        public string JudgePlaceName(string FBrNo, string PkgsBarCode, string PlaceBarCode, out string PlaceName)
        {
            //string PlaceName = "";
            return Icabll.JudgePlaceName(FBrNo, PkgsBarCode, PlaceBarCode, out PlaceName);
        }
        /// 调拨出未审核明细
        [WebMethod]
        public DataSet GetICADetailOut(string FBrNo)
        {
            DataSet ld_return = new DataSet();
            ld_return = Icabll.GetICADetailOut(FBrNo);
            ld_return.Tables[0].TableName = "ICAlDetailOut";
            return ld_return;
        }
        /// 调拨入未完成明细
        [WebMethod]
        public DataSet GetICADetailIn(string FBrNo)
        {
            DataSet ld_return = new DataSet();
            ld_return = Icabll.GetICADetailIn(FBrNo);
            ld_return.Tables[0].TableName = "ICAlDetailIn";
            return ld_return;
        }
        /// 盘点调拨明细信息
        [WebMethod]
        public bool UpdateICADetail(string FBrNo,string PkgsBarCode, string NStockID, string cwname,string flnor , string states)
        {
            return Icabll.UpdateICADetail(FBrNo,PkgsBarCode, NStockID, cwname, flnor, states);
        }
        /// 调拨出  扫码获取明细信息
        [WebMethod]
        public bool GetICAOut(string FBrNo, string PkgsBarCode, out string FEntryNo, out string ItemSku, out string PlaceName)
        {
            return Icabll.GetICAOut(FBrNo, PkgsBarCode, out FEntryNo, out ItemSku, out PlaceName);
        }
        /// 调拨入  扫码获取明细信息
        [WebMethod]
        public bool GetICAIn(string FBrNo, string PkgsBarCode, out string FEntryNo, out string skname, out string NStockID)
        {
            //string FEntryNo = ""; string skname = ""; string NStockID = "";
            return Icabll.GetICAIn(FBrNo, PkgsBarCode, out FEntryNo, out skname, out NStockID);
        }
        /// 调查询包装条码在库存中的状态
        [WebMethod]
        public bool GetStkis(string PkgsBarCode, out string Starte)
        {
            //string FEntryNo = ""; string skname = ""; string NStockID = "";
            return Icabll.GetStkis(PkgsBarCode, out Starte);
        }
        /// 调拨出  审核调拨单
        [WebMethod]
        public bool ExamineICA(string fBrNo, string fExamineID)
        {
            return Icabll.ExamineICA(fBrNo, fExamineID);
        }
        /// 调拨出  完成调拨单
        [WebMethod]
        public bool FinishICA(string fBrNo)
        {
            return Icabll.FinishICA(fBrNo);
        }
        [WebMethod]
        /// <summary>
        /// 调拨入库同步到金蝶
        /// </summary>
        /// <param name="fBrNo"></param>
        /// <returns></returns>
        public int filishDiaobojd(string fBrNo)
        {
            return Icabll.filishDiaobojd(fBrNo);
        }
        #endregion

        #region 拆包
        /// 获取锁库单 
        [WebMethod]
        public DataSet GetLockStoreBill()
        {
            DataSet ld_return = new DataSet();
            ld_return = Lock.GetLockStoreBill();
            ld_return.Tables[0].TableName = "LockStoreBill";
            return ld_return;
        }
        /// 扫码获取明细信息
        [WebMethod]
        public bool GetLockStore(string PkgsBarCode, out string FBrNo, out string HelperCode, out string PlaceBarCode, out string PlaceName, out string WorkBillNo)
        {
            //string FBrNo = ""; string PlaceBarCode = ""; string PlaceName = ""; string HelperCode = ""; string WorkBillNo = "";
            return Lock.GetLockStore(PkgsBarCode, out FBrNo,out  HelperCode,  out PlaceBarCode, out PlaceName, out  WorkBillNo);
        }
        /// 审核锁库单
        [WebMethod]
        public bool ExamineLockStore(string FBrNo, string PkgsBarCode, string WorkBillNo)
        {
            return Lock.ExamineLockStore(FBrNo, PkgsBarCode, WorkBillNo);
        }
        #endregion

        #region 虚采

        /// 获取虚采入库单列表
        [WebMethod]
        public DataSet GetJoint()
        {
            DataSet ld_return = new DataSet();
            ld_return = Joinbll.GetJoint();
            ld_return.Tables[0].TableName = "Join";
            return ld_return;
        }
        /// 获取虚采入库单里的明细
        [WebMethod]
        public DataSet GetJointDetail(string PInterID)
        {
            DataSet ld_return = new DataSet();
            ld_return = Joinbll.GetJointDetail(PInterID);
            ld_return.Tables[0].TableName = "JoinDetail";
            return ld_return;
        }
        /// 更新明细库位信息
        [WebMethod]
        public bool UpdateJointDetail(string pid, string PkgsBarCode, string PlaceBarCode)
        {
            return Joinbll.UpdateJointDetail(pid, PkgsBarCode, PlaceBarCode);
        }
        /// 验收采购单
        [WebMethod]
        public bool ExamineacceptanceState(string fInterID, string masterid, string accname)
        {
            return Joinbll.ExamineacceptanceState(fInterID, masterid, accname);
        }

        #endregion

        #region 报废出库

        //报废单列表
        [WebMethod]
        public DataSet GetAbandonList()
        {
            DataSet ls_return = new DataSet();
            ls_return = ABbll.GetAbandonList();
            ls_return.Tables[0].TableName = "Abandoned";
            return ls_return;
        }

        //报废出库单明细
        [WebMethod]
        public DataSet GetAbandonedDetail(string FBillNo, string Ry,  string date)
        {
            DataSet ld_return = new DataSet();
            ld_return = ABbll.GetAbandonedDetail( FBillNo,  Ry,   date);
            ld_return.Tables[0].TableName = "AbandonedDetail";
            return ld_return;
        }

        //获取条码信息
        [WebMethod]
        public bool GetCode(string PkgsBarCode, out string PlaceBarCode, out string PlaceName, out string Floor, out string Fsku, out string StickLen, out string Stick, out string FQty, out string dc)
        {
            //string PlaceBarCode = ""; string PlaceName = ""; string Floor = ""; string Fsku = ""; string StickLen = ""; string Stick = ""; string FQty = ""; string PkgsIsRegular = "";
            return ABbll.GetCode(PkgsBarCode, out  PlaceBarCode, out  PlaceName, out  Floor, out  Fsku, out  StickLen, out  Stick, out  FQty, out  dc);
        }

       
        /// 查询报废剩余数量
         [WebMethod]
        public int GetAbandonLeftQty(string FBillNo, string Ry, string date)
        {
            return ABbll.GetAbandonLeftQty(FBillNo, Ry,  date);
        }

        /// 更新报废出库
         [WebMethod]
         public int UpdateAbandonedDetail(string PkgsBarCode, string PkgsID, string uid)
        {
            return ABbll.UpdateAbandonedDetail(PkgsBarCode, PkgsID, uid);
        }

        /// 完成报废出库
       [WebMethod]
         public bool FinishAbandoned(string FBillNo, out string txt)
        {
            return ABbll.FinishAbandoned(FBillNo, out  txt);
        }

        #endregion

        #region 总成出库

       //获取总成列表
       [WebMethod]
       public DataSet GetDeliveryMain()
       {
           DataSet ls_return = new DataSet();
           ls_return = debll.GetDeliveryMain();
           ls_return.Tables[0].TableName = "DeliveryMain";
           return ls_return;
       }
       //获取总成单里的明细
       [WebMethod]
       public DataSet GetDelivery(string DInterID) 
       {
           DataSet ls_return = new DataSet();
           ls_return = debll.GetDelivery(DInterID);
           ls_return.Tables[0].TableName = "Delivery";
           return ls_return;
       }
       //获取总成已扫描明细
       [WebMethod]
       public DataSet GetDeliveryStk(string Did) 
       {
           DataSet ls_return = new DataSet();
           ls_return = debll.GetDeliveryStk(Did);
           ls_return.Tables[0].TableName = "DeliveryStk";
           return ls_return;
       }


        //扫码获取件信息
       [WebMethod]
       public bool GetPackage(string PkgsBarCode, out string PkgsID, out string ItemSku, out string StickLen, out string Stick, out string FQty, out string FNumber, out string PkgsStatus)
       {
           return debll.GetPackage(PkgsBarCode, out  PkgsID, out  ItemSku, out  StickLen, out  Stick, out  FQty, out  FNumber, out  PkgsStatus);
       }
        //提交扫描明细
       [WebMethod]
       public bool UpdateDeliveryStk(string PkgsID, string Did)
       {
           return debll.UpdateDeliveryStk(PkgsID, Did);
       }
        //获取明细信息
       [WebMethod]
       public bool GetDeliveryById(string Did, out string DInterID, out string Dnumber, out string NDnumber)
       {
           return debll.GetDeliveryById(Did, out  DInterID, out  Dnumber, out  NDnumber);
       }      
       //完成明细
       [WebMethod]
       public bool FinishDelivery(string Did)
       {
           return debll.FinishDelivery(Did);
       }
       // 完成订单
        [WebMethod]
       public bool FinishDeliveryMain(string DInterID)
       {
           return debll.FinishDeliveryMain(DInterID);
       }
        #endregion

        #region  报废入库
        //报废入库明细总表
        [WebMethod]
        public DataSet GetAbanINStockList()
        { 
           DataSet lb_ds = new DataSet();             
           lb_ds= aibll.GetAbanINStockList();
           lb_ds.Tables[0].TableName = "AbanINStock";
           return lb_ds;
        }

      

         
        // 报废入库单细表
        [WebMethod]
        public DataSet GetAbanINStockDetail(string FBillNo, string FEntryID)
        {
            DataSet lb_ds = new DataSet();
            lb_ds = aibll.GetAbanINStockDetail(FBillNo, FEntryID); 
            lb_ds.Tables[0].TableName="AbanINStockDetail";
            return lb_ds;        
        }


        //获取入库条码
        [WebMethod] //, out string PlaceBarCode, out string PlaceName, out string FInterID, out string PkgsIsRegular
        public bool GetAbanINCode(string PkgsBarCode, string FBillNo, out string PlaceBarCode, out string PlaceName, out string FInterID, out string dc)
           {
               //string PlaceBarCode = ""; string PlaceName = ""; string FInterID = ""; string PkgsIsRegular = "";

               return aibll.GetAbanINCode(PkgsBarCode,FBillNo, out  PlaceBarCode, out  PlaceName, out FInterID, out dc);
           }
        // 更新报废入库
        [WebMethod]
        public  bool UpdateAbanINStock(string FInterID, string PkgsBarCode, string PlaceBarCode, string dc,string Fry)
        {
            return aibll.UpdateAbanINStock(FInterID, PkgsBarCode, PlaceBarCode, dc, Fry);
        }
        //完成报废入库
        [WebMethod]
        public bool FinishAbanINStock(string FBillNo, string FEntryID)
        {
            string txt = "";
            return aibll.FinishAbanINStock(FBillNo, FEntryID,out txt);
        }
        #endregion 

        #region   整理库位

        //获取库位中条码列表
        [WebMethod]
        public DataSet GetAdjustPosition( string CWPID)
        {
            DataSet ls_return = new DataSet();
            ls_return = aabll.GetAdjustPosition(CWPID);
            ls_return.Tables[0].TableName = "AdjustPosition";
            return ls_return;
        }

        //根据库位编码获取库位ID、名称
         [WebMethod]
        public bool GetPIDbyPlaceCode(string PlaceCode, out string CWPID, out string PlaceName)
        {
             //string CWPID="";  string PlaceName="";
            return aabll.GetPIDbyPlaceCode(PlaceCode, out  CWPID, out  PlaceName);
        }


         //根据包装条码查找其所在的库位编码、库位名称、层, out string JPlaceCode, out string JPID, out int Floor
        [WebMethod]
         public bool GetJPIDbyPkgsBarCode(string PkgsBarCode, out string JPlaceCode, out string JPID, out int Floor)
         {
             //string JPlaceCode = ""; ; string JPID = ""; ; int Floor = 0;
             return aabll.GetJPIDbyPkgsBarCode(PkgsBarCode, out  JPlaceCode, out  JPID, out  Floor);
         }

        //更新包装条码的库位、层
        [WebMethod]
        public string UPdateSTOCKFloor(string PkgsBarCode, string CWPID, int Floor)
        {
            return aabll.UPdateSTOCKFloor(PkgsBarCode, CWPID, Floor);
        }

        #endregion

        #region 快速出库
      
        //获取快速出库列表
        [WebMethod]
        public DataSet GetFastOutStockList()
        {
            DataSet ds = new DataSet();
            ds = fosb.GetFastOutStockList();
            ds.Tables[0].TableName ="FastOutStock";
            return ds;
        }

        //获取快速出库明细
        [WebMethod]
        public DataSet GetFastOutStockDetail(string FBillNo)
        {
            DataSet ds = new DataSet();
            ds = fosb.GetFastOutStockDetail(FBillNo);
            ds.Tables[0].TableName ="FastOutStockDetail";
            return ds;
        }

        //插入快速出库
        [WebMethod]
        public bool InsertFastOutStockDetail(string  FInterID,string FBillNo, string WorkBillNo, string PkgsBarCode, string userid, string len)
        {
            return fosb.InsertFastOutStockDetail(FInterID,FBillNo, WorkBillNo, PkgsBarCode, userid, len);
        }

        //更新快速出库的需求数量
        [WebMethod]
        public bool UpdateFastOutStock(string FBillNo, decimal NeedQty,string FInterID)
        {
            return fosb.UpdateFastOutStock(FBillNo, NeedQty,FInterID);
        }

        //判断已扫的但未出库的数量
         [WebMethod]
        public decimal GetFastOutStockScanQty(string FBillNo)
        {
            return fosb.GetFastOutStockScanQty(FBillNo);
        }

         //获取不定尺的根长
         [WebMethod]
         public string GetBDCLen( string PkgsBarCode, out string StickLen)
         {
             return fosb.GetBDCLen(PkgsBarCode, out  StickLen);
         }

        ////获取不定尺的明细，并且排序
        //  [WebMethod]
        // public bool GetBDC(string FBillNo)
        // {
        //     return fosb.GetBDC(FBillNo);
        // }
         //完成快速出库单
          [WebMethod]
         public bool FinishFastOutStock(string FBillNo, string userid, string FInterID, out string l_txt)
          {
              //string l_txt = "";
              return fosb.FinishFastOutStock(FBillNo, userid, FInterID, out  l_txt);
          }
        #endregion

    }
}
